
int removeElement(int* nums, int numsSize, int val)
{   
    int src = 0;
    int dst = 0;
    while (src < numsSize)
    {
        if (nums[src] == val)
        {
            src++;
        }
        else
        {
            nums[dst++] = nums[src++];
        }
    }
    return dst;
}
int main()
{
	int arr[] = { 0,1,2,2,3,0,4,2 };
    int size = sizeof(arr) / sizeof(arr[0]);
    int ret = removeElement(arr, size, 2);
	printf("%d", ret);
	return 0;
}